package io.renren.modules.practice.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.practice.entity.AlgorithmQuizEntity;
import io.renren.modules.practice.entity.StudentSubmitAlgorithmPracticeEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AlgorithmQuizDao extends BaseMapper<AlgorithmQuizEntity> {

    /**
     * 将提交过的代码保存到数据库中
     */
    void insertStudentAlgorithmQuizSubmitData(StudentSubmitAlgorithmPracticeEntity entity);

    /**
     * 根据章节ID查询算法题目列表
     */
    List<AlgorithmQuizEntity> selectByChapterId(@Param("chapterId") Integer chapterId);

}
